package com.itpan.Mapper;

import com.itpan.Entity.Employee;
import com.itpan.Entity.PurchaseOrder;
import com.itpan.Entity.StatsByT;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface PurchaseOrderMapper {
    List<PurchaseOrder> getAll();
    List<PurchaseOrder> getAllPage(RowBounds rowBounds);
    PurchaseOrder getById(@Param("orderID") Long orderID);
    List<PurchaseOrder> getbyMutil(PurchaseOrder purchaseOrder);
    void addOne(PurchaseOrder purchaseOrder);
    void addAll(@Param("list") List<PurchaseOrder> list);
    void updatePurchaseOrder(PurchaseOrder purchaseOrder);
    void deleteById(@Param("orderID") Long orderID);


    //统计员工采购总额排名
    List<StatsByT> getSumPriceOfEveryEmployee();

    List<StatsByT> getcounttimeofemployee();

    List<Employee> getbyempid(@Param("id") String id);

    List<StatsByT> gettotalof7();


    List<PurchaseOrder> getPurchaseOrdersByDateRange(@Param("startDate") LocalDateTime startDate, @Param("endDate") LocalDateTime endDate);
}
